
package cz.muni.fi.pb138.jprvyd;

import java.util.Date;
import java.util.List;

/**
 *
 * @author xholusa
 */
public interface PaymentManager {
    
    /**
     * Creates a new Payment
     * 
     * @param payment payment to be created, must have id set to NULL
     * @throws IllegalEntityException 
     */
    public void createPayment(Payment payment) throws IllegalEntityException;
    
    /**
     * Removes a payment
     * 
     * @param id id of the payment to be removed
     */
    public void removePayment(Long id);
    
    /**
     * Updates an existing payment
     * 
     * @param payment payment to be updated, must have id set
     * @throws IllegalEntityException 
     */
    public void updatePayment(Payment payment) throws IllegalEntityException;
    
    /**
     * Retrieves a single payment by id
     * @param id id of the payment to be retrived
     * @return payment
     */
    public Payment getPaymentById(Long id);   
    
    /**
     * Retrieves a sinle payment by variable symbol
     * 
     * @param variableSymbol variable symbol of the payment to be retrieved
     * @return payment
     */
    public Payment getPaymentByVariableSymbol(int variableSymbol);   
    
    /**
     * Retrieves a list of payments by date
     * 
     * @param date
     * @return 
     */
    public List<Payment> getPaymentsByDate(Date date);  
    
    /**
     * Retrieves a list of payments by bank account
     * 
     * @param bankAccount
     * @return 
     */
    public List<Payment> getPaymentsByBankAccount(String bankAccount);
    
    /**
     * Retrieves a list of all payments
     * 
     * @return 
     */
    public List<Payment> getAllPayments();
    
    /** 
     * Retrieves a total sum of all payments
     * 
     * @return 
     */
    public int getSumTotal();
}
